package com.javaweb.web.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.javaweb.annotation.url.ControllerMethod;
import com.javaweb.base.BaseResponseResult;
import com.javaweb.base.BaseService;
import com.javaweb.constant.ApiCommonConstant.OperationLogConstant;
import com.javaweb.enums.AuthEnum;
import com.javaweb.enums.HttpCodeEnum;
import com.javaweb.util.entity.Page;
import com.javaweb.web.eo.operationLog.OperationLogListRequest;

/**
 * 登录且需要权限才可访问的操作日志管理模块
 * <p>
 * 该模块主要提供操作日志管理相关的接口
 * 
 * @author tank2140896
 */
@RestController
@RequestMapping(OperationLogConstant.WEB_OPERATIONLOG_PREFIX)
public class OperationLogController extends BaseService {

	/**
	 * 查询操作日志接口
	 * 
	 * @param operationLogListRequest 操作日志列表请求参数
	 * @return BaseResponseResult 接口通用返回参数
	 */
    @PostMapping(OperationLogConstant.OPERATIONLOG_LIST)
    @ControllerMethod(interfaceName="查询操作日志接口",auth=AuthEnum.PERMISSION)
    public BaseResponseResult operationLogList(@RequestBody OperationLogListRequest operationLogListRequest) {
        Page page = operationLogService.operationLogList(operationLogListRequest);
        return getBaseResponseResult(HttpCodeEnum.SUCCESS,"operationlog.list.success",page);
    }
    
}